using System.ComponentModel.DataAnnotations.Schema;

namespace Wips.Domain.Models.Authorities.Model
{
    /// <summary>
    /// 用户组与角色关联
    /// </summary>
    [Table("AuthorityUserGroupRoles")]
    [SugarTable("AuthorityUserGroupRoles")]
    public class UserGroupRole : ValueObjectBase
    {
        /// <summary>
        /// 用户组ID
        /// </summary>
        /// <value></value>
        public string UserGroupId { get; set; }

        /// <summary>
        /// 用户组
        /// </summary>
        /// <value></value>
        [Navigate(NavigateType.ManyToOne, nameof(UserGroupId))]
        public UserGroup UserGroup { get; set; }

        /// <summary>
        /// 角色ID
        /// </summary>
        /// <value></value>
        public string RoleId { get; set; }

        /// <summary>
        /// 角色
        /// </summary>
        /// <value></value>
        [Navigate(NavigateType.ManyToOne, nameof(RoleId))]
        public Role Role { get; set; }
    }
}